QT       += core gui multimedia

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++14

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    main.cpp \
    mainwindow.cpp \
    src/qrcode/qrcodecontroller.cpp

HEADERS += \
    mainwindow.h \
    src/qrcode/qrcodecontroller.h

FORMS += \
    mainwindow.ui

# 3rdparty opencv
Opencv_ROOT_DIR = $$PWD/3rdparty/opencv4
Opencv_INCLUDE_PATH = $$Opencv_ROOT_DIR/include/opencv4
Opencv_LIBRARY_PATH = $$Opencv_ROOT_DIR/lib
Opencv_LIBRARIES =  -lopencv_reg -lopencv_phase_unwrapping -lopencv_wechat_qrcode -lopencv_dnn_objdetect \
                    -lopencv_photo -lopencv_hfs -lopencv_saliency -lopencv_highgui -lopencv_text -lopencv_bioinspired \
                    -lopencv_aruco -lopencv_video -lopencv_tracking -lopencv_ccalib -lopencv_rapid -lopencv_xphoto \
                    -lopencv_freetype -lopencv_features2d -lopencv_bgsegm -lopencv_shape -lopencv_videostab \
                    -lopencv_superres -lopencv_ximgproc -lopencv_dpm -lopencv_quality -lopencv_gapi -lopencv_barcode \
                    -lopencv_structured_light -lopencv_optflow -lopencv_surface_matching -lopencv_intensity_transform \
                    -lopencv_dnn_superres -lopencv_mcc -lopencv_xobjdetect -lopencv_core -lopencv_imgcodecs -lopencv_stitching \
                    -lopencv_face -lopencv_datasets -lopencv_xfeatures2d -lopencv_ml -lopencv_fuzzy -lopencv_objdetect \
                    -lopencv_plot -lopencv_videoio -lopencv_flann -lopencv_line_descriptor -lopencv_rgbd -lopencv_img_hash \
                    -lopencv_dnn -lopencv_imgproc -lopencv_calib3d -lopencv_stereo
message(-L$${Opencv_LIBRARY_PATH})
INCLUDEPATH += $${Opencv_INCLUDE_PATH}
LIBS += -L$${Opencv_LIBRARY_PATH} $${Opencv_LIBRARIES} -Wl,-rpath=$${Opencv_LIBRARY_PATH}

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
